package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.UserDto;
import com.zzyl.entity.User;
import com.zzyl.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    //分页查询用户列表
    List<UserVo> selectUserList(User user);

    //新增用户
    void insertUser(User user);

    //更新用户信息
    void updateUser(User user);

    //查询用户信息
    User selectUserById(@Param("id") Long id);

    //查询用户名和邮箱是否存在
    List<User> selectByRealNameOreEail(@Param("realName") String realName,
                                       @Param("email") String email);

    //账号密码重置
    void updatePassWord(@Param("id") Long id,
                        @Param("password") String password);


    List<User> selectUserByIds(List<Long> collect);
}
